\(\int \frac {\cosh ^3(c+d x)}{(e+f x)^2 (a+i a \sinh (c+d x))} \, dx\) [270]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [F(-1)]
   Maxima [F(-2)]
   Giac [B] (verification not implemented)
   Mupad [F(-1)]

Optimal result

Integrand size = 31, antiderivative size = 180 \[ \int \frac {\cosh ^3(c+d x)}{(e+f x)^2 (a+i a \sinh (c+d x))} \, dx=-\frac {\cosh (c+d x)}{a f (e+f x)}-\frac {i d \cosh \left (2 c-\frac {2 d e}{f}\right ) \text {Chi}\left (\frac {2 d e}{f}+2 d x\right )}{a f^2}+\frac {d \text {Chi}\left (\frac {d e}{f}+d x\right ) \sinh \left (c-\frac {d e}{f}\right )}{a f^2}+\frac {i \sinh (2 c+2 d x)}{2 a f (e+f x)}+\frac {d \cosh \left (c-\frac {d e}{f}\right ) \text {Shi}\left (\frac {d e}{f}+d x\right )}{a f^2}-\frac {i d \sinh \left (2 c-\frac {2 d e}{f}\right ) \text {Shi}\left (\frac {2 d e}{f}+2 d x\right )}{a f^2} \]

[Out]

-I*d*Chi(2*d*e/f+2*d*x)*cosh(2*c-2*d*e/f)/a/f^2-cosh(d*x+c)/a/f/(f*x+e)+d*cosh(c-d*e/f)*Shi(d*e/f+d*x)/a/f^2-I
*d*Shi(2*d*e/f+2*d*x)*sinh(2*c-2*d*e/f)/a/f^2+d*Chi(d*e/f+d*x)*sinh(c-d*e/f)/a/f^2+1/2*I*sinh(2*d*x+2*c)/a/f/(
f*x+e)

Rubi [A] (verified)

Time = 0.27 (sec) , antiderivative size = 180, normalized size of antiderivative = 1.00, number of steps used = 11, number of rules used = 7, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.226, Rules used = {5682, 3378, 3384, 3379, 3382, 5556, 12} \[ \int \frac {\cosh ^3(c+d x)}{(e+f x)^2 (a+i a \sinh (c+d x))} \, dx=\frac {d \sinh \left (c-\frac {d e}{f}\right ) \text {Chi}\left (\frac {d e}{f}+d x\right )}{a f^2}-\frac {i d \cosh \left (2 c-\frac {2 d e}{f}\right ) \text {Chi}\left (\frac {2 d e}{f}+2 d x\right )}{a f^2}-\frac {i d \sinh \left (2 c-\frac {2 d e}{f}\right ) \text {Shi}\left (\frac {2 d e}{f}+2 d x\right )}{a f^2}+\frac {d \cosh \left (c-\frac {d e}{f}\right ) \text {Shi}\left (\frac {d e}{f}+d x\right )}{a f^2}+\frac {i \sinh (2 c+2 d x)}{2 a f (e+f x)}-\frac {\cosh (c+d x)}{a f (e+f x)} \]

[In]

Int[Cosh[c + d*x]^3/((e + f*x)^2*(a + I*a*Sinh[c + d*x])),x]

[Out]

-(Cosh[c + d*x]/(a*f*(e + f*x))) - (I*d*Cosh[2*c - (2*d*e)/f]*CoshIntegral[(2*d*e)/f + 2*d*x])/(a*f^2) + (d*Co
shIntegral[(d*e)/f + d*x]*Sinh[c - (d*e)/f])/(a*f^2) + ((I/2)*Sinh[2*c + 2*d*x])/(a*f*(e + f*x)) + (d*Cosh[c -
 (d*e)/f]*SinhIntegral[(d*e)/f + d*x])/(a*f^2) - (I*d*Sinh[2*c - (2*d*e)/f]*SinhIntegral[(2*d*e)/f + 2*d*x])/(
a*f^2)

Rule 12

Int[(a_)*(u_), x_Symbol] :> Dist[a, Int[u, x], x] /; FreeQ[a, x] &&  !MatchQ[u, (b_)*(v_) /; FreeQ[b, x]]

Rule 3378

Int[((c_.) + (d_.)*(x_))^(m_)*sin[(e_.) + (f_.)*(x_)], x_Symbol] :> Simp[(c + d*x)^(m + 1)*(Sin[e + f*x]/(d*(m
 + 1))), x] - Dist[f/(d*(m + 1)), Int[(c + d*x)^(m + 1)*Cos[e + f*x], x], x] /; FreeQ[{c, d, e, f}, x] && LtQ[
m, -1]

Rule 3379

Int[sin[(e_.) + (Complex[0, fz_])*(f_.)*(x_)]/((c_.) + (d_.)*(x_)), x_Symbol] :> Simp[I*(SinhIntegral[c*f*(fz/
d) + f*fz*x]/d), x] /; FreeQ[{c, d, e, f, fz}, x] && EqQ[d*e - c*f*fz*I, 0]

Rule 3382

Int[sin[(e_.) + (Complex[0, fz_])*(f_.)*(x_)]/((c_.) + (d_.)*(x_)), x_Symbol] :> Simp[CoshIntegral[c*f*(fz/d)
+ f*fz*x]/d, x] /; FreeQ[{c, d, e, f, fz}, x] && EqQ[d*(e - Pi/2) - c*f*fz*I, 0]

Rule 3384

Int[sin[(e_.) + (f_.)*(x_)]/((c_.) + (d_.)*(x_)), x_Symbol] :> Dist[Cos[(d*e - c*f)/d], Int[Sin[c*(f/d) + f*x]
/(c + d*x), x], x] + Dist[Sin[(d*e - c*f)/d], Int[Cos[c*(f/d) + f*x]/(c + d*x), x], x] /; FreeQ[{c, d, e, f},
x] && NeQ[d*e - c*f, 0]

Rule 5556

Int[Cosh[(a_.) + (b_.)*(x_)]^(p_.)*((c_.) + (d_.)*(x_))^(m_.)*Sinh[(a_.) + (b_.)*(x_)]^(n_.), x_Symbol] :> Int
[ExpandTrigReduce[(c + d*x)^m, Sinh[a + b*x]^n*Cosh[a + b*x]^p, x], x] /; FreeQ[{a, b, c, d, m}, x] && IGtQ[n,
 0] && IGtQ[p, 0]

Rule 5682

Int[(Cosh[(c_.) + (d_.)*(x_)]^(n_)*((e_.) + (f_.)*(x_))^(m_.))/((a_) + (b_.)*Sinh[(c_.) + (d_.)*(x_)]), x_Symb
ol] :> Dist[1/a, Int[(e + f*x)^m*Cosh[c + d*x]^(n - 2), x], x] + Dist[1/b, Int[(e + f*x)^m*Cosh[c + d*x]^(n -
2)*Sinh[c + d*x], x], x] /; FreeQ[{a, b, c, d, e, f, m}, x] && IGtQ[n, 1] && EqQ[a^2 + b^2, 0]

Rubi steps \begin{align*} \text {integral}& = -\frac {i \int \frac {\cosh (c+d x) \sinh (c+d x)}{(e+f x)^2} \, dx}{a}+\frac {\int \frac {\cosh (c+d x)}{(e+f x)^2} \, dx}{a} \\ & = -\frac {\cosh (c+d x)}{a f (e+f x)}-\frac {i \int \frac {\sinh (2 c+2 d x)}{2 (e+f x)^2} \, dx}{a}+\frac {d \int \frac {\sinh (c+d x)}{e+f x} \, dx}{a f} \\ & = -\frac {\cosh (c+d x)}{a f (e+f x)}-\frac {i \int \frac {\sinh (2 c+2 d x)}{(e+f x)^2} \, dx}{2 a}+\frac {\left (d \cosh \left (c-\frac {d e}{f}\right )\right ) \int \frac {\sinh \left (\frac {d e}{f}+d x\right )}{e+f x} \, dx}{a f}+\frac {\left (d \sinh \left (c-\frac {d e}{f}\right )\right ) \int \frac {\cosh \left (\frac {d e}{f}+d x\right )}{e+f x} \, dx}{a f} \\ & = -\frac {\cosh (c+d x)}{a f (e+f x)}+\frac {d \text {Chi}\left (\frac {d e}{f}+d x\right ) \sinh \left (c-\frac {d e}{f}\right )}{a f^2}+\frac {i \sinh (2 c+2 d x)}{2 a f (e+f x)}+\frac {d \cosh \left (c-\frac {d e}{f}\right ) \text {Shi}\left (\frac {d e}{f}+d x\right )}{a f^2}-\frac {(i d) \int \frac {\cosh (2 c+2 d x)}{e+f x} \, dx}{a f} \\ & = -\frac {\cosh (c+d x)}{a f (e+f x)}+\frac {d \text {Chi}\left (\frac {d e}{f}+d x\right ) \sinh \left (c-\frac {d e}{f}\right )}{a f^2}+\frac {i \sinh (2 c+2 d x)}{2 a f (e+f x)}+\frac {d \cosh \left (c-\frac {d e}{f}\right ) \text {Shi}\left (\frac {d e}{f}+d x\right )}{a f^2}-\frac {\left (i d \cosh \left (2 c-\frac {2 d e}{f}\right )\right ) \int \frac {\cosh \left (\frac {2 d e}{f}+2 d x\right )}{e+f x} \, dx}{a f}-\frac {\left (i d \sinh \left (2 c-\frac {2 d e}{f}\right )\right ) \int \frac {\sinh \left (\frac {2 d e}{f}+2 d x\right )}{e+f x} \, dx}{a f} \\ & = -\frac {\cosh (c+d x)}{a f (e+f x)}-\frac {i d \cosh \left (2 c-\frac {2 d e}{f}\right ) \text {Chi}\left (\frac {2 d e}{f}+2 d x\right )}{a f^2}+\frac {d \text {Chi}\left (\frac {d e}{f}+d x\right ) \sinh \left (c-\frac {d e}{f}\right )}{a f^2}+\frac {i \sinh (2 c+2 d x)}{2 a f (e+f x)}+\frac {d \cosh \left (c-\frac {d e}{f}\right ) \text {Shi}\left (\frac {d e}{f}+d x\right )}{a f^2}-\frac {i d \sinh \left (2 c-\frac {2 d e}{f}\right ) \text {Shi}\left (\frac {2 d e}{f}+2 d x\right )}{a f^2} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.69 (sec) , antiderivative size = 212, normalized size of antiderivative = 1.18 \[ \int \frac {\cosh ^3(c+d x)}{(e+f x)^2 (a+i a \sinh (c+d x))} \, dx=\frac {-2 f \cosh (c+d x)-2 i d (e+f x) \cosh \left (2 c-\frac {2 d e}{f}\right ) \text {Chi}\left (\frac {2 d (e+f x)}{f}\right )+2 d (e+f x) \text {Chi}\left (d \left (\frac {e}{f}+x\right )\right ) \sinh \left (c-\frac {d e}{f}\right )+i f \sinh (2 (c+d x))+2 d e \cosh \left (c-\frac {d e}{f}\right ) \text {Shi}\left (d \left (\frac {e}{f}+x\right )\right )+2 d f x \cosh \left (c-\frac {d e}{f}\right ) \text {Shi}\left (d \left (\frac {e}{f}+x\right )\right )-2 i d e \sinh \left (2 c-\frac {2 d e}{f}\right ) \text {Shi}\left (\frac {2 d (e+f x)}{f}\right )-2 i d f x \sinh \left (2 c-\frac {2 d e}{f}\right ) \text {Shi}\left (\frac {2 d (e+f x)}{f}\right )}{2 a f^2 (e+f x)} \]

[In]

Integrate[Cosh[c + d*x]^3/((e + f*x)^2*(a + I*a*Sinh[c + d*x])),x]

[Out]

(-2*f*Cosh[c + d*x] - (2*I)*d*(e + f*x)*Cosh[2*c - (2*d*e)/f]*CoshIntegral[(2*d*(e + f*x))/f] + 2*d*(e + f*x)*
CoshIntegral[d*(e/f + x)]*Sinh[c - (d*e)/f] + I*f*Sinh[2*(c + d*x)] + 2*d*e*Cosh[c - (d*e)/f]*SinhIntegral[d*(
e/f + x)] + 2*d*f*x*Cosh[c - (d*e)/f]*SinhIntegral[d*(e/f + x)] - (2*I)*d*e*Sinh[2*c - (2*d*e)/f]*SinhIntegral
[(2*d*(e + f*x))/f] - (2*I)*d*f*x*Sinh[2*c - (2*d*e)/f]*SinhIntegral[(2*d*(e + f*x))/f])/(2*a*f^2*(e + f*x))

Maple [A] (verified)

Time = 117.28 (sec) , antiderivative size = 299, normalized size of antiderivative = 1.66

method result size
risch \(-\frac {d \,{\mathrm e}^{-d x -c}}{2 a f \left (d f x +d e \right )}+\frac {d \,{\mathrm e}^{-\frac {c f -d e}{f}} \operatorname {Ei}_{1}\left (d x +c -\frac {c f -d e}{f}\right )}{2 a \,f^{2}}-\frac {d \,{\mathrm e}^{d x +c}}{2 f^{2} a \left (\frac {d e}{f}+d x \right )}-\frac {d \,{\mathrm e}^{\frac {c f -d e}{f}} \operatorname {Ei}_{1}\left (-d x -c -\frac {-c f +d e}{f}\right )}{2 f^{2} a}+\frac {i d \,{\mathrm e}^{2 d x +2 c}}{4 a \,f^{2} \left (\frac {d e}{f}+d x \right )}+\frac {i d \,{\mathrm e}^{\frac {2 c f -2 d e}{f}} \operatorname {Ei}_{1}\left (-2 d x -2 c -\frac {2 \left (-c f +d e \right )}{f}\right )}{2 a \,f^{2}}-\frac {i d \,{\mathrm e}^{-2 d x -2 c}}{4 a f \left (d f x +d e \right )}+\frac {i d \,{\mathrm e}^{-\frac {2 \left (c f -d e \right )}{f}} \operatorname {Ei}_{1}\left (2 d x +2 c -\frac {2 \left (c f -d e \right )}{f}\right )}{2 a \,f^{2}}\) \(299\)

[In]

int(cosh(d*x+c)^3/(f*x+e)^2/(a+I*a*sinh(d*x+c)),x,method=_RETURNVERBOSE)

[Out]

-1/2*d/a*exp(-d*x-c)/f/(d*f*x+d*e)+1/2*d/a/f^2*exp(-(c*f-d*e)/f)*Ei(1,d*x+c-(c*f-d*e)/f)-1/2/f^2*d/a*exp(d*x+c
)/(d*e/f+d*x)-1/2/f^2*d/a*exp((c*f-d*e)/f)*Ei(1,-d*x-c-(-c*f+d*e)/f)+1/4*I*d/a/f^2*exp(2*d*x+2*c)/(d*e/f+d*x)+
1/2*I*d/a/f^2*exp(2*(c*f-d*e)/f)*Ei(1,-2*d*x-2*c-2*(-c*f+d*e)/f)-1/4*I/a*d*exp(-2*d*x-2*c)/f/(d*f*x+d*e)+1/2*I
/a*d/f^2*exp(-2*(c*f-d*e)/f)*Ei(1,2*d*x+2*c-2*(c*f-d*e)/f)

Fricas [A] (verification not implemented)

none

Time = 0.24 (sec) , antiderivative size = 226, normalized size of antiderivative = 1.26 \[ \int \frac {\cosh ^3(c+d x)}{(e+f x)^2 (a+i a \sinh (c+d x))} \, dx=\frac {{\left (i \, f e^{\left (4 \, d x + 4 \, c\right )} - 2 \, f e^{\left (3 \, d x + 3 \, c\right )} - 2 \, {\left ({\left (i \, d f x + i \, d e\right )} {\rm Ei}\left (-\frac {2 \, {\left (d f x + d e\right )}}{f}\right ) e^{\left (\frac {2 \, {\left (d e - c f\right )}}{f}\right )} + {\left (d f x + d e\right )} {\rm Ei}\left (-\frac {d f x + d e}{f}\right ) e^{\left (\frac {d e - c f}{f}\right )} - {\left (d f x + d e\right )} {\rm Ei}\left (\frac {d f x + d e}{f}\right ) e^{\left (-\frac {d e - c f}{f}\right )} + {\left (i \, d f x + i \, d e\right )} {\rm Ei}\left (\frac {2 \, {\left (d f x + d e\right )}}{f}\right ) e^{\left (-\frac {2 \, {\left (d e - c f\right )}}{f}\right )}\right )} e^{\left (2 \, d x + 2 \, c\right )} - 2 \, f e^{\left (d x + c\right )} - i \, f\right )} e^{\left (-2 \, d x - 2 \, c\right )}}{4 \, {\left (a f^{3} x + a e f^{2}\right )}} \]

[In]

integrate(cosh(d*x+c)^3/(f*x+e)^2/(a+I*a*sinh(d*x+c)),x, algorithm="fricas")

[Out]

1/4*(I*f*e^(4*d*x + 4*c) - 2*f*e^(3*d*x + 3*c) - 2*((I*d*f*x + I*d*e)*Ei(-2*(d*f*x + d*e)/f)*e^(2*(d*e - c*f)/
f) + (d*f*x + d*e)*Ei(-(d*f*x + d*e)/f)*e^((d*e - c*f)/f) - (d*f*x + d*e)*Ei((d*f*x + d*e)/f)*e^(-(d*e - c*f)/
f) + (I*d*f*x + I*d*e)*Ei(2*(d*f*x + d*e)/f)*e^(-2*(d*e - c*f)/f))*e^(2*d*x + 2*c) - 2*f*e^(d*x + c) - I*f)*e^
(-2*d*x - 2*c)/(a*f^3*x + a*e*f^2)

Sympy [F(-1)]

Timed out. \[ \int \frac {\cosh ^3(c+d x)}{(e+f x)^2 (a+i a \sinh (c+d x))} \, dx=\text {Timed out} \]

[In]

integrate(cosh(d*x+c)**3/(f*x+e)**2/(a+I*a*sinh(d*x+c)),x)

[Out]

Timed out

Maxima [F(-2)]

Exception generated. \[ \int \frac {\cosh ^3(c+d x)}{(e+f x)^2 (a+i a \sinh (c+d x))} \, dx=\text {Exception raised: RuntimeError} \]

[In]

integrate(cosh(d*x+c)^3/(f*x+e)^2/(a+I*a*sinh(d*x+c)),x, algorithm="maxima")

[Out]

Exception raised: RuntimeError >> ECL says: THROW: The catch RAT-ERR is undefined.

Giac [B] (verification not implemented)

Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 1080 vs. \(2 (172) = 344\).

Time = 0.35 (sec) , antiderivative size = 1080, normalized size of antiderivative = 6.00 \[ \int \frac {\cosh ^3(c+d x)}{(e+f x)^2 (a+i a \sinh (c+d x))} \, dx=\text {Too large to display} \]

[In]

integrate(cosh(d*x+c)^3/(f*x+e)^2/(a+I*a*sinh(d*x+c)),x, algorithm="giac")

[Out]

-1/4*(2*I*(f*x + e)*(d - d*e/(f*x + e) + c*f/(f*x + e))*d^2*Ei(-2*((f*x + e)*(d - d*e/(f*x + e) + c*f/(f*x + e
)) + d*e - c*f)/f)*e^(2*(d*e - c*f)/f) + 2*I*d^3*e*Ei(-2*((f*x + e)*(d - d*e/(f*x + e) + c*f/(f*x + e)) + d*e
- c*f)/f)*e^(2*(d*e - c*f)/f) - 2*I*c*d^2*f*Ei(-2*((f*x + e)*(d - d*e/(f*x + e) + c*f/(f*x + e)) + d*e - c*f)/
f)*e^(2*(d*e - c*f)/f) + 2*(f*x + e)*(d - d*e/(f*x + e) + c*f/(f*x + e))*d^2*Ei(-((f*x + e)*(d - d*e/(f*x + e)
 + c*f/(f*x + e)) + d*e - c*f)/f)*e^((d*e - c*f)/f) + 2*d^3*e*Ei(-((f*x + e)*(d - d*e/(f*x + e) + c*f/(f*x + e
)) + d*e - c*f)/f)*e^((d*e - c*f)/f) - 2*c*d^2*f*Ei(-((f*x + e)*(d - d*e/(f*x + e) + c*f/(f*x + e)) + d*e - c*
f)/f)*e^((d*e - c*f)/f) - 2*(f*x + e)*(d - d*e/(f*x + e) + c*f/(f*x + e))*d^2*Ei(((f*x + e)*(d - d*e/(f*x + e)
 + c*f/(f*x + e)) + d*e - c*f)/f)*e^(-(d*e - c*f)/f) - 2*d^3*e*Ei(((f*x + e)*(d - d*e/(f*x + e) + c*f/(f*x + e
)) + d*e - c*f)/f)*e^(-(d*e - c*f)/f) + 2*c*d^2*f*Ei(((f*x + e)*(d - d*e/(f*x + e) + c*f/(f*x + e)) + d*e - c*
f)/f)*e^(-(d*e - c*f)/f) + 2*I*(f*x + e)*(d - d*e/(f*x + e) + c*f/(f*x + e))*d^2*Ei(2*((f*x + e)*(d - d*e/(f*x
 + e) + c*f/(f*x + e)) + d*e - c*f)/f)*e^(-2*(d*e - c*f)/f) + 2*I*d^3*e*Ei(2*((f*x + e)*(d - d*e/(f*x + e) + c
*f/(f*x + e)) + d*e - c*f)/f)*e^(-2*(d*e - c*f)/f) - 2*I*c*d^2*f*Ei(2*((f*x + e)*(d - d*e/(f*x + e) + c*f/(f*x
 + e)) + d*e - c*f)/f)*e^(-2*(d*e - c*f)/f) - I*d^2*f*e^(2*(f*x + e)*(d - d*e/(f*x + e) + c*f/(f*x + e))/f) +
2*d^2*f*e^((f*x + e)*(d - d*e/(f*x + e) + c*f/(f*x + e))/f) + 2*d^2*f*e^(-(f*x + e)*(d - d*e/(f*x + e) + c*f/(
f*x + e))/f) + I*d^2*f*e^(-2*(f*x + e)*(d - d*e/(f*x + e) + c*f/(f*x + e))/f))*f^2/(((f*x + e)*a*(d - d*e/(f*x
 + e) + c*f/(f*x + e))*f^4 + a*d*e*f^4 - a*c*f^5)*d)

Mupad [F(-1)]

Timed out. \[ \int \frac {\cosh ^3(c+d x)}{(e+f x)^2 (a+i a \sinh (c+d x))} \, dx=\int \frac {{\mathrm {cosh}\left (c+d\,x\right )}^3}{{\left (e+f\,x\right )}^2\,\left (a+a\,\mathrm {sinh}\left (c+d\,x\right )\,1{}\mathrm {i}\right )} \,d x \]

[In]

int(cosh(c + d*x)^3/((e + f*x)^2*(a + a*sinh(c + d*x)*1i)),x)

[Out]

int(cosh(c + d*x)^3/((e + f*x)^2*(a + a*sinh(c + d*x)*1i)), x)